//  测试标准输入能否被设置偏移值
//  lseek.c
//  programing_in_unix
//
//  Created by homcin on 2017/12/6.
//  Copyright © 2017年 tarshe. All rights reserved.
//

#include "apue.h"

int main(void)
{
    if(lseek(STDIN_FILENO, 0, SEEK_CUR) == -1)
        printf("cannot seek\n");
    else
        printf("seek OK\n");
    exit(0);
        
}

/*
 ./seek.out  < /etc/paswd
 seek OK
 cat < /etc/passwd | ./seek.out
 cannot seek
 ./seek.out < /var/spool/cron/FIFO
 cannot seek
*/
